<template>
    <el-aside width="200px">
        <!-- <el-menu
          v-if="getActive == 'conf-center'"
          router
          :default-active="$route.path"
        >
          <el-menu-item index="/conf-center/role">
            <span slot="title">角色</span>
          </el-menu-item>
          <el-menu-item index="/conf-center/usersInfo">
            <span slot="title">账号</span>
          </el-menu-item>
        </el-menu>
        <el-menu
          v-if="getActive == 'setting'"
          router
          :default-active="$route.path"
        >
          <el-menu-item index="/setting/system">
            <span slot="title">系统清单</span>
          </el-menu-item>
        </el-menu>
        -->
        <el-menu v-for="item in routers" :key="item.path" :default-active="$route.path">
            <el-menu-item
                v-if="item.meta && getActive == 'conf-center'"
                :index="item.path"
                @click="jumpto(item.path)"
            >
                <span slot="title">{{ item.meta.title }}</span>
            </el-menu-item>
        </el-menu>
    </el-aside>
</template>
<script>
import { jumpto } from "@/utils/index";
export default {
    data() {
        return {
            jumpto,
        };
    },
    computed: {
        auth() {
            return this.$store.state.auth;
        },
        getActive() {
            return this.$route.path.split("/")[1];
        },
        routers() {
            return this.$router.options.routes;
        },
    },
    mounted() {
        // let that = this;
        // setTimeout(() => {
        //     console.log(that.routers);
        // }, 2000);
    },
    methods: {},
};
</script>
<style scoped>
@import "/assets/styles/reset";
</style>
